#include "newWidget.h"



NewWidget::NewWidget(QWidget * parent)
    : QWidget(parent)
{

}

NewWidget::~NewWidget()
{

}

void NewWidget::mouseDoubleClickEvent(QMouseEvent * event)
{
    if(m_widget != nullptr)
    {
        if(!m_widget->isFullScreen())
        {
            m_widget->setParent(nullptr);
            m_widget->setWindowFlag(Qt::Window);
            m_widget->showFullScreen();
            m_task->setFullScreen(true);
        }
        else
        {
            m_widget->setParent(m_parent);
            m_parentLayout->addWidget(m_widget, m_row, m_col);
            m_widget->setWindowFlag(Qt::SubWindow);
            m_widget->showNormal();
            m_task->setFullScreen(false);

        }
    }
}

void NewWidget::mousePressEvent(QMouseEvent * event)
{

}


